#include "blisp.h"

Type Symbol_t;

static int IS_CASE_SENSITIVE;

int is_case_sensitive(void)
{
	return IS_CASE_SENSITIVE;
}

void set_case_sensitive(void)
{
	IS_CASE_SENSITIVE = CTRUE;
}

void set_case_insensitive(void)
{
	IS_CASE_SENSITIVE = CFALSE;
}

Object *Symbol_eval(Object *o)
{
	return getsymbol(o)->val;
}

char *Symbol_to_cstr(Object *o)
{
	Object o2;
	Object *op = &o2;
	settype(op, TSTRING);
	setstring(op, getsymbol(o)->name);
	return String_to_cstr(op);
}

Object *Symbol_equal(Object *o1, Object *o2)
{
	return Eq_p(o1, o2);
}

int symbol_equal(Object *o1, Object *o2)
{
	return eq_p(o1, o2);
}
